//---------------------------------------------------------------------------

#ifndef createRatingUnitH
#define createRatingUnitH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ComCtrls.hpp>
#include <Vcl.ImgList.hpp>
#include <Vcl.DBGrids.hpp>
#include <Vcl.Grids.hpp>
#include <Vcl.Menus.hpp>
#include <Vcl.ValEdit.hpp>
#include <Vcl.CheckLst.hpp>
#include <Vcl.Samples.Spin.hpp>
//---------------------------------------------------------------------------
class TcreateRatingForm : public TForm
{
__published:	// IDE-managed Components
	TLabel *Label1;
	TLabel *Label2;
	TLabel *Label3;
	TComboBox *study_type_combo;
	TComboBox *spec_combo;
	TComboBox *predmet_combo;
	TButton *Button1;
	TImageList *ImageList24;
	TPageControl *PageControl1;
	TTabSheet *TabSheet1;
	TTabSheet *TabSheet2;
	TDBGrid *study_plan_grid;
	TGroupBox *GroupBox1;
	TLabel *Label7;
	TComboBox *lesson_types_combo;
	TLabel *Label8;
	TLabel *Label9;
	TComboBox *mark_type_combo;
	TButton *add_study_plan_button;
	TMainMenu *MainMenu1;
	TMenuItem *N1;
	TMenuItem *N2;
	TMenuItem *N3;
	TLabel *Label13;
	TButton *Button4;
	TMenuItem *N4;
	TMenuItem *N5;
	TMenuItem *N6;
	TMenuItem *N7;
	TMenuItem *N8;
	TTabSheet *TabSheet3;
	TDBGrid *DBGrid2;
	TGroupBox *GroupBox2;
	TLabel *Label10;
	TComboBox *group_combo;
	TLabel *Label11;
	TLabel *Label15;
	TComboBox *prepod_combo;
	TButton *Button5;
	TTabSheet *TabSheet4;
	TLabel *Label18;
	TEdit *max_score_edit;
	TDBGrid *lesson_type_step_grid;
	TGroupBox *GroupBox3;
	TLabel *Label19;
	TEdit *lesson_num;
	TEdit *step_nam;
	TLabel *Label20;
	TLabel *Label21;
	TButton *Button6;
	TButton *Button9;
	TGroupBox *GroupBox4;
	TLabel *Label22;
	TComboBox *ComboBox2;
	TCheckBox *CheckBox1;
	TCheckBox *CheckBox2;
	TCheckBox *CheckBox3;
	TCheckBox *CheckBox4;
	TCheckBox *CheckBox5;
	TCheckBox *CheckBox6;
	TCheckBox *CheckBox7;
	TCheckBox *CheckBox8;
	TCheckBox *CheckBox9;
	TCheckBox *CheckBox10;
	TCheckBox *CheckBox11;
	TCheckBox *CheckBox12;
	TLabel *Label23;
	TLabel *Label24;
	TLabel *Label25;
	TLabel *Label26;
	TEdit *Edit4;
	TButton *Button10;
	TTabSheet *TabSheet5;
	TDBGrid *score_grid;
	TGroupBox *GroupBox5;
	TLabel *Label32;
	TEdit *mark_ed;
	TLabel *Label33;
	TEdit *mark_mean_ed;
	TLabel *Label34;
	TButton *Button12;
	TTabSheet *TabSheet6;
	TComboBox *ComboBox4;
	TDBGrid *DBGrid5;
	TGroupBox *GroupBox6;
	TLabel *Label40;
	TComboBox *ComboBox6;
	TLabel *Label41;
	TEdit *Edit8;
	TCheckListBox *CheckListBox1;
	TStringGrid *StringGrid2;
	TButton *Button3;
	TMemo *Memo1;
	TTabSheet *TabSheet7;
	TDBGrid *DBGrid1;
	TMemo *Memo2;
	TStringGrid *StringGrid1;
	TComboBox *study_plan_combo;
	TLabel *Label42;
	TButton *Button11;
	TButton *Button13;
	TButton *Button14;
	TTabSheet *TabSheet8;
	TLabel *Label4;
	TDBGrid *SStep_grid;
	TGroupBox *GroupBox7;
	TLabel *Label6;
	TLabel *Label12;
	TEdit *sstep_name_edit;
	TButton *Button15;
	TButton *Button16;
	TDBGrid *DBGrid3;
	TButton *delete_study_plan_button;
	TSpinEdit *sstep_count_spin_edit;
	TSpinEdit *lesson_count_spin_edit;
	TDateTimePicker *step_date_picker;
	TButton *Button2;
	TDateTimePicker *sub_step_date_picker;
	TSpinEdit *mark_score_spin_edit;
	TButton *Button7;
	TLabel *Label5;
	void __fastcall study_type_comboChange(TObject *Sender);
	void __fastcall spec_comboChange(TObject *Sender);
	void __fastcall N6Click(TObject *Sender);
	void __fastcall Button1Click(TObject *Sender);
	void __fastcall add_study_plan_buttonClick(TObject *Sender);
	void __fastcall Button3Click(TObject *Sender);
	void __fastcall lesson_type_raschet_comboChange(TObject *Sender);
	void __fastcall Button6Click(TObject *Sender);
	void __fastcall Button9Click(TObject *Sender);
	void __fastcall lesson_type_step_comboChange(TObject *Sender);
	void __fastcall lesson_types_comboChange(TObject *Sender);
	void __fastcall study_plan_comboChange(TObject *Sender);
	void __fastcall Button12Click(TObject *Sender);
	void __fastcall Button4Click(TObject *Sender);
	void __fastcall Button11Click(TObject *Sender);
	void __fastcall Button13Click(TObject *Sender);
	void __fastcall Button14Click(TObject *Sender);
	void __fastcall Button15Click(TObject *Sender);
	void __fastcall DBGrid3CellClick(TColumn *Column);
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall PageControl1Changing(TObject *Sender, bool &AllowChange);
private:	// User declarations
	TStringList *id_predmets;
	TStringList *id_lesson_types;
	TStringList *id_study_plan;
	bool rating_true;
public:		// User declarations
	__fastcall TcreateRatingForm(TComponent* Owner);
	void update_study_type_combo();
	void update_spec_combo();
	void update_variables();
	void update_formula_memo();
	void update_predmet_combo();
	void update_lesson_types_combo();
	void update_lesson_types_raschet_combo();
	void update_study_plan_grid();
	void update_score_grid();
	void update_step_grid();
	void update_sstep_grid();
	void update_group_combo();
	int id_prepod;
	int id_predmet;
	int lesson_types_count;
	bool rating_validation(int id_predmet);
};
//---------------------------------------------------------------------------
extern PACKAGE TcreateRatingForm *createRatingForm;
//---------------------------------------------------------------------------
#endif
